package cn.wenhe9.novel.domain.dto;

import cn.wenhe9.novel.json.searializer.UsernameSerializer;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户评论
 * @author DuJinliang
 * 2022/5/20
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class UserCommentDto implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 评论用户昵称
     */
//    @JsonSerialize(using = UsernameSerializer.class) 当用户名短的时候会数组越界
    private String nickName;

    /**
     * 用户头像
     */
    private String userPhoto;


    /**
     * 评价内容
     */
    private String commentContent;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

}
